package imageIcon;

import javax.swing.*;

import java.awt.*;
import java.net.URL;

public class EjemploImageIcon extends JFrame {
	private static final long serialVersionUID = 1L;
	
	EjemploImageIcon() {
	
		URL url = getClass().getResource("home.jpg");
		ImageIcon ii = new ImageIcon(url);
		add(new JLabel("", ii, JLabel.CENTER));
		
		
		setSize(500, 500);
		setVisible(true);
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
	}

	public static void main(String[] args) {
		new EjemploImageIcon();
	}
}